#include <iostream>
#include <vector>
#include <climits>
#include <algorithm>
using namespace std;

void Test1()
{
    int n = 0;
    vector<int> v;
    int res = INT_MAX;

    cin >> n;
    v.resize(n);
    for (int i = 0; i < n; ++i)
    {
        cin >> v[i];
    }

    sort(v.begin(), v.end());
    for (int lf = 0, rg = 1; rg < n; ++rg)
    {
        int diff = v[rg] - v[lf];
        res = min(res, diff);

        while (lf != rg)
        {
            res = min(res, diff);
            diff = v[rg] - v[++lf];
        }
    }

    cout << res << endl;
}

void Test2()
{
    int n = 0;
    int res = 1;
    vector<int> v;

    cin >> n;
    res = 0;
    v.resize(n);
    for (int i = 0; i < n; ++i)
    {
        cin >> v[i];
    }

    for (int lf = 0, rg = 1; rg < n; ++rg)
    {
        if (v[rg] - v[rg - 1] > 8)
            lf = rg;
        res = max(res, rg - lf + 1);
    }

    cout << res << endl;
}

int main()
{


    return 0;
}